﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Linq;
using NextCMS.Models;

/// <summary>
/// Summary description for ModuleController
/// </summary>
public class ModulesHelper : IModules
{
    IModules modules = null;
    public ModulesHelper()
    {
        //modules = new NextCMS.DataAccess.Modules();
        modules = (IModules)NextCMS.DataAccess.Entities.CreateInstance<IModules>();
    }
    public ModuleModel GetById(int id)
    {
        return modules.GetById(id);
    }
    public IEnumerable<ModuleModel> GetAllModules()
    {
        return modules.GetAllModules();
    }
    public void Dispose()
    {
        modules.Dispose();
        modules = null;
    }
}